<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>部门添加</title>
    
	<base href="<%=basePath%>">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>css/bootstrap.css">
	<script type="text/javascript" src="<%=basePath%>js/bootstrap.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
	<script language="JavaScript">
    function check()
    {
    	if(document.fcmp.cmpname.value=="")
    	{
  			alert("部门名不能为空！");
    		document.fcmp.cmpname.focus();
   		 	return false;
    	}
    }
    </script>

  </head>
  
  <body>
    <div id="bodydiv" style="width:400px;margin:auto;overflow:auto;float:middle" >
		
    		<form action="<%=basePath%>servlet/AddCmpServlet" name="fcmp" method="post" onsubmit="return check()">
    			<table width="200px" border="0" class="table table-bordered table-hover">  			
      				<tr>
        				<th height="38" class="success" colspan="2" scope="col">添加部门(带*为必填项)</th>
       	 			</tr>
      				<tr>
      		 			<th width="125" scope="row">部门名称</th>
      		  			<td width="171">
      		  				<input type="text" align="middle" name="cmpname"><font color="#FF0000">*</font>&nbsp;
      		  			</td>
     	 			</tr>
      				
    			</table>
    		
    			<table>			
    				<tr>
    					<td width="70%"></td>
    					<td>
    						<button type="submit" class="btn btn-primary" onclick="submit">提交</button>
							<button type="reset" class="btn btn-primary">重置</button>	
    					</td>
    				</tr>
    			</table>
    		</form>

</div>
  </body>
</html>
